package classes.singleton;

/**
 * 饿汉式单例设计模式
 */
public class Singleton {
    private static Singleton singleton = new Singleton();

    // 私有化类的构造器，防止外界造对象
    private Singleton() {

    }

    public static Singleton getSingleton() {
        return singleton;
    }
}
